package javabook.ch04;

public class Jv_4_8_arry1 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		int[] ken = {10, 20, 30, 40, 50};
		
		int i, ave, sum = 0;
		
		System.out.println("***** result *****");
		
		for(i=0; i<5; i++){
			System.out.println( "ken[" + i + "] = " + ken[i] );
			sum += ken[i];
		}		
		
		System.out.println("sum = " + sum);
		
		ave = sum/ken.length;
		//ave= sum/3;
		System.out.println("average is = " + ave);
		
	}

}
